﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Customer_TypeUC.ascx.cs" Inherits="ERP.PageUC.Customer_TypeUC" %>
<script>
    function CheckSaveCustomer_Type() {
        var kt1 = $('#<%=txtMaLoaiKhachHang.ClientID %>');
        var kt2 = $('#<%=txtLoaiKhachHang .ClientID %>');
        var allFields = $([]).add(kt1).add(kt2);
        var valid;
        allFields.removeClass("ui-state-error");
        valid = checkLength(kt1, "Mã loại khách hàng", 1, 50);
        valid = valid && checkLength(kt2, "Tên loại khách hàng", 1, 50);
        if (valid) {
            updateTips('');
            allFields.removeClass("ui-state-error");
        }
        return valid;
    }
</script>
<asp:UpdatePanel ID="upNewUpdatePanel" UpdateMode="Conditional" ChildrenAsTriggers="true" runat="server">
    <ContentTemplate>
        <div class="btn-toolbar">
            <asp:Button ID="btnSavePopup" CssClass="btn-save btn-default" title="Lưu lại" runat="server" OnClientClick="return CheckSaveCustomer_Type();" OnClick="btnSavePopup_Click" />
            &nbsp;
            <asp:Button ID="btnReloadPopup" CssClass="btn-reload btn-default" title="Tải lại" runat="server" OnClick="btnReloadPopup_Click" />
            &nbsp;
            <input type="hidden" id="lbID" runat="server" /><label class="validateTips"></label>
            <asp:UpdateProgress ID="upDateProcessUC" runat="server" AssociatedUpdatePanelID="upNewUpdatePanel">
                <ProgressTemplate>
                    <span class="label label-warning">Đang tải..</span>
                </ProgressTemplate>
            </asp:UpdateProgress>
        </div>
        <div class="ui-main">
            <div class="ui-box-text-box">
                <label class="labelpopup">Mã loại khách hàng <span style="color: Red">(*)</span></label>
                <br />
                <asp:TextBox ID="txtMaLoaiKhachHang" CssClass="textbox_child_text" runat="server" data-allow="add"></asp:TextBox>
            </div>
            <div class="ui-box-text-box">
                <label class="labelpopup">Loại khách hàng <span style="color: Red">(*)</span></label>
                <br />
                <asp:TextBox ID="txtLoaiKhachHang" CssClass="textbox_child_text" runat="server" data-allow="add"></asp:TextBox>
            </div>
            <div class="clr"></div>
        </div>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="btnSavePopup" EventName="Click" />
    </Triggers>
</asp:UpdatePanel>